#include <iostream>
#include <cstdio>
using namespace std;

int main(){
	double l;
	double m1=100000*0.1;
	double m2=m1+100000*0.075;
	double m3=m2+200000*0.05;
	double m4=m3+200000*0.03;
	double m5=m4+400000*0.015;
	cin>>l;
	if(l<=100000){
		printf("%.3f",0.1*l);
	}else if(l<200000){
		printf("%.3f",m1+(l-100000)*0.075);
	}else if(l<400000){
		printf("%.3f",m2+(l-200000)*0.05);
	}else if(l<600000){
		printf("%.3f",m3+(l-400000)*0.03);
	}else if(l<1000000){
		printf("%.3f",m4+(l-600000)*0.015);
	}else{
		printf("%.3f",m5+(l-1000000)*0.01);
	}
	return 0;
}
